package com.zjs.db.affair.Service;

import com.util.result.Message;
import com.zjs.db.affair.domain.AOrder;
import com.zjs.db.affair.domain.DOrder;
import com.zjs.db.affair.mapper.AMapper;
import com.zjs.db.affair.mapper.DMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * 描述
 *
 * @author zhu
 * @version 1.0
 * @date 2021/6/24 16:01
 */
@Slf4j
@Service
@Transactional
public class DServiceImpl {

    @Resource
    private AMapper aMapper;

    @Resource
    private DMapper mapper;

    public Message dService(String currentTime) {
        log.info("开始执行D方法");
        AOrder order = aMapper.selectOrderByOrderNo("A100");
        order.setUpdateTime(currentTime);
        aMapper.updateOrderData(order);
        log.info("结束执行D方法");
        return Message.success();
    }
}
